﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Collections.ObjectModel;
using System.IO;

namespace WcfService2
{

    [DataContract(Name = "PurchaseOrder")]
    public class Emp
    {
        [DataMember]
        int _id;
        [DataMember]
        string _firstName;
        [DataMember]
        string _lastName;
        [DataMember]
        int _salary;
        public Emp(int id, string firstName, string lastName, int salary)
        {
            this._id = id;
            this._firstName = firstName;
            this._lastName = lastName;
            this._salary = salary;
        }
    }
    [DataContract(Name="Student")]
    public class Student
    {
        [DataMember]
        string First_Name;

        public string First_Name1
        {
            get { return First_Name; }
            set { First_Name = value; }
        }

        
        [DataMember]
        string Last_Name;

        public string Last_Name1
        {
            get { return Last_Name; }
            set { Last_Name = value; }
        }

        
        [DataMember]
        int Age;

        public int Age1
        {
            get { return Age; }
            set { Age = value; }
        }

        
        [DataMember]
        int Marks_Obtained;

        public int Marks_Obtained1
        {
            get { return Marks_Obtained; }
            set { Marks_Obtained = value; }
        }

       
        [DataMember]
        int Roll_Number;

        public int Roll_Number1
        {
            get { return Roll_Number; }
            set { Roll_Number = value; }
        }

        [DataMember]
        string AdultOrNot;

        public string AdultOrNot1
        {
            get { return AdultOrNot; }
            set { AdultOrNot = value; }
        }

        
    }
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    [ServiceContract]
    public interface IService1
    {

        [OperationContract]
        string GetData(int value);
        [OperationContract]
        int[] GetRollNumbers();
        [OperationContract]
        void Enroll_Student(string f_name,string l_name,int age,int mo);
        [OperationContract]
        DataSet Display();
        [OperationContract]
        void Update_Student(string f_name, string l_name, int age, int mo,int roll);
        [OperationContract]
        void Delete_Student(int roll);
        [OperationContract]
        void Create_File();
        [OperationContract]
        int mergeExample();
        [OperationContract]
        string mergeExample1();
        [OperationContract]
        Emp Complex();
        [OperationContract]
        Dictionary<int, string> GetRollNumbers1();
        [OperationContract]
        List<string> GetFirstNameList();
        [OperationContract]
        Student StudentDetails();

        

        
        // TODO: Add your service operations here
    }

    
    
    }
       // Use a data contract as illustrated in the sample below to add composite types to service operations.
 

